home *** CD-ROM | disk | FTP | other *** search
/ User's Choice Windows CD / User's Choice Windows CD (CMS Software)(1993).iso / utility1 / gs261src.zip / GZSTATE.H < prev    next >
C/C++ Source or Header  |  1993-05-13  |  3KB  |  93 lines

  1. /* Copyright (C) 1989, 1992 Aladdin Enterprises.  All rights reserved.
  2.  
  3. This file is part of Ghostscript.
  4.  
  5. Ghostscript is distributed in the hope that it will be useful, but
  6. WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
  7. to anyone for the consequences of using it or for whether it serves any
  8. particular purpose or works at all, unless he says so in writing.  Refer
  9. to the Ghostscript General Public License for full details.
  10.  
  11. Everyone is granted permission to copy, modify and redistribute
  12. Ghostscript, but only under the conditions described in the Ghostscript
  13. General Public License.  A copy of this license is supposed to have been
  14. given to you along with Ghostscript so you can know your rights and
  15. responsibilities.  It should be in a file named COPYING.  Among other
  16. things, the copyright notice and this notice must be preserved on all
  17. copies.  */
  18.  
  19. /* gzstate.h */
  20. /* Private graphics state definition for Ghostscript library */
  21. #include "gxfixed.h"
  22. #include "gxmatrix.h"
  23. #include "gsstate.h"
  24.  
  25. /* Composite components of the graphics state. */
  26. struct gx_transfer_map_s;
  27. typedef struct gx_transfer_s {
  28.     struct gx_transfer_map_s *red;
  29.     struct gx_transfer_map_s *green;
  30.     struct gx_transfer_map_s *blue;
  31.     struct gx_transfer_map_s *gray;
  32. } gx_transfer;
  33.  
  34. /* Graphics state structure.  See pp. 59-60 of the PostScript manual. */
  35. struct gs_state_s {
  36.     gs_state *saved;        /* previous state from gsave */
  37.     const gs_memory_procs *memory_procs;
  38. /* Transformation: */
  39.     gs_matrix_fixed ctm;
  40. #define ctm_only(pgs) *(gs_matrix *)&(pgs)->ctm
  41.     gs_matrix ctm_inverse;
  42.     int inverse_valid;        /* true if ctm_inverse = ctm^-1 */
  43. /* Paths: */
  44.     struct gx_path_s *path;
  45.     struct gx_clip_path_s *clip_path;
  46.     int clip_rule;
  47. /* Lines: */
  48.     struct line_params_s *line_params;
  49. /* Halftone screen: */
  50.     struct halftone_params_s *halftone;
  51.     float (*ht_proc)(P2(floatp, floatp));
  52.     gs_int_point ht_phase;
  53.     gs_int_point phase_mod;        /* negated phase mod tile size */
  54.     struct gx_ht_cache_s *ht_cache;    /* shared by all GCs */
  55. /* Color (device-independent): */
  56.     struct gs_color_space_s *color_space;
  57.     struct gs_client_color_s *ccolor;
  58. /* Color (device-dependent): */
  59.     struct gs_cie_render_s *cie_render;
  60.     int overprint;
  61.     float (*black_generation)(P2(const gs_state *, floatp));
  62.     float (*undercolor_removal)(P2(const gs_state *, floatp));
  63.     gx_transfer transfer;
  64. /* Color caches: */
  65.     struct gx_device_color_s *dev_color;
  66.     struct gx_cie_joint_caches_s *cie_joint_caches;
  67.     const struct gx_color_map_procs_s *cmap_procs;
  68. /* Font: */
  69.     struct gs_font_s *font;
  70.     gs_matrix_fixed char_tm;    /* font matrix * ctm */
  71. #define char_tm_only(pgs) *(gs_matrix *)&(pgs)->char_tm
  72.     int char_tm_valid;        /* true if char_tm is valid */
  73.     byte in_cachedevice;        /* true after a setcachedevice */
  74.     byte in_charpath;        /* 0 if not in charpath, */
  75.                     /* 1 if false charpath, */
  76.                     /* 2 if true charpath */
  77.                     /* (see charpath_flag in */
  78.                     /* gs_show_enum_s) */
  79.     gs_state *show_gstate;        /* gstate when show was invoked */
  80.                     /* (so charpath can append to path) */
  81. /* Other stuff: */
  82.     int level;            /* incremented by 1 per gsave */
  83.     float flatness;
  84.     fixed fill_adjust;        /* fattening for fill */
  85.     int stroke_adjust;
  86.     struct device_s *device;
  87.     int device_is_shared;        /* true if device is shared, */
  88.                     /* so don't deallocate at grestore */
  89. /* Client data: */
  90.     char/*void*/ *client_data;
  91.     gs_state_client_procs client_procs;
  92. };
  93.